home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / mc51bugs / q32293 < prev    next >
Text File  |  1988-07-20  |  938b  |  36 lines

  1. Q32293 _rectangle Hangs Computer when Points Are Out of Bounds
  2. C Compiler
  3. 5.10   | 5.10
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.    The graphic function _rectangle can cause the system to hang when a
  8. call is made to it and the rectangle coordinates are outside the
  9. display window.
  10.    The following program will cause the system to hang on the second
  11. _rectangle call:
  12.  
  13. #include <stdio.h>
  14. #include <graph.h>
  15.  
  16. main()
  17. {
  18.         if (_setvideomode ( _MRES16COLOR ) )
  19.         {
  20.                 _rectangle ( _GFILLINTERIOR, 80, 50, 240, 150 ) ;
  21.  
  22.          /*  The following statement will cause the system to hang  */
  23.  
  24.                 _rectangle ( _GFILLINTERIOR, 410, 420, 440, 440 ) ;
  25.                 while (!kbhit()) ;
  26.         }
  27.         else
  28.         {
  29.                 printf("Unsupported video mode...\n") ;
  30.         }
  31.         _setvideomode (_DEFAULTMODE) ;
  32. }
  33.  
  34. Keywords:  buglist5.10 buglist1.01 QuickC
  35. Updated  88/07/21 03:19
  36.